Image analysis systems for grading of meat, predicting quality of meat and/or predicting meat yield of an animal carcass

ABSTRACT

The invention is an image analysis system and method for grading of meat, predicting quality of meat and/or predicting meat yield of an animal. One embodiment of the invention is particularly designed to capture an image of the 12 th  rib cross section of the ribeye and perform an image analysis of the ribeye for grading purposes. The image capturing camera portion of the system has a wedged shaped camera housing for ease of insertion into the ribbed incision. The image capturing portion of the system further comprises a camera with a flash for consistent lighting. The camera is positioned such that it views the ribeye cross section at an angle to accommodate the wedge shape of the camera housing for ease of insertion in the incision. The camera housing also has various alignment means to facilitate the user&#39;s ability to capture images in a consistent manner. Once the image is captured either digitally or captured and converted to a digital image, an image analysis is performed on the digital image to determine parameters such as the percentage lean, total area of the ribeye, total fat area, total lean area, percent marbling, and thickness of fat adjacent to the ribeye, and other parameters. These parameters are used to predict value determining traits of the carcass.

BACKGROUND OF INVENTION

(1) Field of Invention

The invention relates to automated grading of meat and predicting meatyield and quality of meat from an animal carcass and, more particularly,to capturing images of meat portions of an animal carcass and processinginformation in the image for grading of meat and predicting meat yield.

(2) Background Art

Grading of animal carcasses for the purpose of predicting meat yield andquality is an important aspect of the meat processing industry. Meatgrading has historically been performed by a human grader. To performthe meat grading process the human grader will typically examine keyphysical aspects of the carcass. The type of grading being performeddetermines what physical aspects of the carcass need to be examined bythe grader. The two main types of meat grading for a carcass are qualitygrade and yield grade. The quality grade describes the meat'spalatability or tenderness. Whereas, yield grade describes theproportion of lean boneless meat that a given carcass will yield.

In the meat industry, it is common for the human grader to examinevarious physical aspects of a cross section of the Longissimus dorsi(commonly referred to in beef as the ‘ribeye’ and in pork as the ‘loineye’) for both yield grading and quality grading. In a typical beefprocessing facility after the animal has been slaughtered, head removedand skinned, the carcass is further disassembled by splitting thecarcass in half along the midline. The carcass is then ‘ribbed’ orsevered between the twelfth 12^(th) and 13^(th) ribs thereby exposingfor examination and grading a cross section of meat or a cutting surfaceof meat, which specifically includes the ribeye and associatedsubcutaneous fat. For quality grade, the human grader will typicallyexamine the ‘marbling’ (intramuscular fat). For yield grade, the humangrader will typically examine the area of the ribeye cross section andthe thickness of subcutaneous fat adjacent to the ribeye at variouspoints around its area and adjust the fat thickness based on fatness ofthe entire carcass. For yield grade, the human grader also utilizesparameters such as hot carcass weight and percentage kidney, pelvic andheart fat for determining yield grade.

Grading by a human grader is typically based upon the human grader'sperception of the appearance of the ribeye. Photographs can be utilizedas standards for determining grade. Photographs are used for trainingfor quality grade, but are not typically used for grading. This processclearly introduces a substantial amount of subjectivity into the meatprocessing industry. The Human Grader's subjectivity is problematicbecause this grading determines the valuation of animal carcasses andtherefore clearly effects the financial bottom line.

Yield grade is typically denoted by a numerical value from 1 to 5 basedupon the yield from the carcass of boneless, closely trimmed(approximately 0.25 in.), retail cuts from the round, loin, rib andchuck. An accurate yield grade for these four wholesale cuts of meat isextremely important to an accurate valuation of the carcass, thusreducing the amount of subjectivity is desirable. These four wholesalecuts make up approximately 75% of the weight, and about 90% of thecarcass value. Regression equations for carcass grading have beendeveloped from actual carcass data using factors such as fat thicknessat the twelfth ribeye cross section, ribeye area and carcass weight.However, the regression equations are not practical for a human graderto utilize during actual everyday grading of a carcass in a productionfacility. Therefore, working formulas have been developed which makecertain adjustments to the yield grade based on the same type of factorsutilized by the regression equations. However, this process stillresults in a substantial amount of subjectivity.

In order to reduce operator subjectivity, automated instrumental gradingsystems have been developed. For example, various type of image analysisgrading systems have been developed, which capture and analyze digitalimages of portions of a carcass. The image analysis systems typicallyexamine parameters similar to or identical to the type of parametersexamined by a human grader. Typically the image analysis systems try todetermine and distinguish portions that are lean and portions that arefat and their respective areas. To distinguish meat portions (i.e. leanor fat; ribeye muscle or non-ribeye muscle surrounding ribeye) the imageanalysis system will typically utilize parameters such as color andcontrast.

It is typical for the image analysis to be performed on the 12^(th)ribeye cross section. However, regardless of the section of meat that isbeing analyzed, there are various problems in utilizing image analysisto characterize the features of the meat. For example, the muscle or thelean area of interest can be surrounded by other lean areas with minimalfat separation, which is typically true of a ribeye cross section.Therefore, it is often difficult for the image analysis system todistinguish between the muscle of interest and the adjacent musclebecause the dimensions and shape of a given muscle type may varyconsiderably from carcass to carcass. Another example is that a muscleof a given carcass may have large areas of intramuscular fat, whereasthat same muscle type for another carcass may not have the large area ofintramuscular fat. This is problematic because it is difficult due tothe intramuscular fat to determine where the desired muscle ends and theadjacent muscle begins. Dense marbling can also make it difficult todetermine the border or the cross section area of the muscle ofinterest. Yet another example is distinguishing color transitions fromfat to lean. Color distinction is critical particularly with densemarbling and large areas of intramuscular fat because digital analysisalgorithms often look for continuous adjacent pixels of the same colorto determine if a red or lean region of the image is within the area ofthe desired muscle. Due to the above problems many image analysissystems have difficulty identifying the correct area of the desiredmuscle and then appropriately analyzing the image.

Image analysis of the ribeye poses unique problems particularly in aproduction meat processing environment where the ribbed carcass halvesare graded for quality and yield. In a typical production meatprocessing facility, particularly beef processing, the halved and ribbedbeef carcass travels through the grading area suspended from a conveyorhook by the achilles tendon. The ribbed section of the carcass partiallyexposes the 12^(th) rib cross section. The cross section is not fullyexposed for ease of viewing because the ribbing incision is minimizedsuch that the carcass stays intact. If the ribbing incision is too deepthe head portion of the carcass will separate from the hind portion dueto weight and gravity. Therefore, due to the minimized incision, it issometimes difficult even for the human grader to get a clear view of thecross section for grading purposes without physically manipulating thecarcass to obtain a better view. It is even more difficult to insert acamera in the incision to capture a good image consistently that hasadequate lighting, minimal shading, and with minimal angular distortionsof the image. Obtaining a good and consistent image must be achievedprior to even addressing the problems of image analysis identifiedabove. However, obtaining a high quality image is difficult and mostsystems are inadequate, particularly with the inconsistent andnon-uniform lighting found in most facilities.

BRIEF SUMMARY OF INVENTION

The invention is an image analysis system and method for grading ofmeat, predicting quality of meat and/or predicting meat yield of ananimal carcass. One embodiment of the invention is particularly designedto capture an image of the 12^(th) rib cross section of the carcass sideand perform image analysis of the ribeye for grading purposes. The imagecapturing camera portion of the system has a substantially wedged shapedcamera housing for ease of insertion into the ribbed incision. The imagecapturing portion of the system further comprises a camera with a flashfor consistent lighting. The camera is positioned such that it views theribeye cross section at an angle to accommodate the wedge shape of thecamera housing for ease of insertion in the incision. The camera housingalso has various alignment means to facilitate the user's ability tocapture images in a consistent manner. Once the image is captured eitherdigitally or captured and converted to a digital image, an imageanalysis is performed on the digital image to determine parameters suchas the total area of the ribeye, total fat area, total lean area,percent marbling, and thickness of subcutaneous fat adjacent to theribeye. The image analysis algorithm performs multiple steps to obtainthe desired parameters. The steps include, geometrical correction forangular distortions particularly due to the wedge shaped camera housing,shading correction, image flip when processing the compliment (right)side of carcass, first adaptive color segmentation for fat and leancolor distinction, erosion and dilation, second adaptive colorsegmentation and contour determination. The adaptive color segmentationis one novel aspect of the invention that provides for distinct colorseparation for lean and fat thereby facilitating defining the totalribeye area, total fat area, total lean area and percent marbling.

BRIEF DESCRIPTION OF DRAWINGS

For a better understanding of the present invention, reference may bemade to the accompanying drawings.

FIG. 1 is a perspective view of the image capturing camera assembly.

FIG. 2 is a side cross sectional view of the image capturing camera.

FIG. 3 is a front cross sectional view of the image capturing camera.

FIG. 4 is a functional diagram of the overall system.

FIG. 5 is a flow diagram of the image analysis algorithm.

FIG. 5a is a representation of using an ellipse to calculate a newcenter of gravity and a second ribeye contour.

FIG. 5b is a representation of the method of cutting undesired cornersand edges.

FIG. 6 is a detailed flow diagram of the color segmentation portion ofthe algorithm.

FIG. 7 is a detailed flow diagram of the contour determination portionof the algorithm.

DETAILED DESCRIPTION OF INVENTION

According to the embodiment(s) of the present invention, various viewsare illustrated in FIGS. 1-7 and like reference numerals are being usedconsistently to refer to like and corresponding parts of the inventionfor all of the various Figs. of the drawing. The first digit(s) of thereference number for a given item or part should correspond to the Fig.Number in which the item or part is first identified.

The present invention is an image analysis system and method for gradingof meat, predicting quality of meat and/or predicting meat yield of ananimal carcass. This system and method is designed to be utilized in ameat processing facility, specifically those related to beef processing.The system and method is designed to capture an image of an exposedribeye cross section of a halved ribbed beef carcass. The system isspecifically designed to enable the user to consistently capture aquality image of the ribeye cross section by inserting a wedged-shapecamera into the incision of the ribbed carcass. Once the image iscaptured, the present invention performs an image analysis of thedigitized image for grading of the beef carcass. The followingdescription and drawing should clarify the detailed operation of atleast one embodiment of the invention.

Referring to FIG. 1, a perspective view of the image capturing cameraassembly is shown. The image capturing camera assembly 100 is designedwith a substantially wedge-shaped form factor to facilitate insertioninto the ribbed incision. The image capturing camera comprises anergonomically designed handle 102 which further comprises a trigger orswitch communicably linked to the camera and flash, not seen in thisview, refer to FIG. 2, item 212, for triggering the shutter of thecamera for capture of the image with the camera and also triggering orflashing the camera flash.

The image capturing camera assembly 100 has a substantially wedge-shapedhousing 106 having a height that tapers from a taller back end 101 to ashorter front end 103. The taper is formed by a tapered or sloped top,and the bottom is substantially flat. The bottom has an opening orviewing window designed for positioning over a ribeye cross section orother meat part for viewing and capturing an image. One embodiment shownin FIGS. 1-3 is a two-piece housing design comprising a front noseportion 109 and a rear portion 110. The rear portion 110 of the housingis where the camera is housed and mounted and the front nose portion 109is for insertion into the incision of the ribbed carcass. For theembodiment shown in FIGS. 1-3, the nose portion is generally apolyhedron having a substantially wedge-shaped form factor. The top 111and bottom 107 of the nose portion of the housing intersect forming ablunt edge such that there is an oblique dihedral angle between the topand bottom giving the nose portion a substantially wedge shape. The noseportion further comprises an opening or viewing window on the bottom.The sides 105 of the nose portion are canted inwardly toward one anotherfrom bottom to top in order to facilitate the user's viewing around thecamera housing. One benefit of a separate front nose portion is the easeof removing and cleaning.

The front nose portion is firmly attached to the rear portion 110 wherethe camera is mounted and the handle 102 is attached. The rear portionalso has a generally polyhedron form factor. The rear portion isattached to the front nose portion in such a manner that the cameramounted therein is angled downward directing its field of view towardthe opening or viewing window on the bottom side of the front noseportion. The top 116 of the rear portion is generally aligned with thetop 111 of the front nose portion to provide a substantially consistenttaper to the overall top. The sides 118 of the rear portion are cantedinward toward one another from bottom to top similar to the sides 105 ofthe front nose portion. The bottom 120 of the rear portion forms anoblique dihedral angle with the bottom side 107 of the front noseportion to assist in achieving the appropriate angle of the cameramounted therein. The camera and its mounting can also provide a portionof or all of the desired angling. The resulting form factor of theoverall two-piece housing is a substantially wedge-shaped form factor.The camera wedge-shaped housing is designed to form a hood over thecamera assembly including, camera, camera flash and electronics so thatthe field of view includes only the object of interest and standardizesthe distance between the camera lens and the object of interest. Thehousing 106 is designed with a large enough opening such that the camerahas a full view of the ribeye cross section. The hood or housing 106 hasa substantially wedge shape such that is can be easily inserted into theribbed carcass and adequately aligned. The housing 106, in addition tohaving an overall wedge shape top to bottom, also has inwardly taperedsides 105, 118 in order to reduce the size of the housing while notobstructing the field of view of the camera. The tapered sides aredesigned to improve the user's view of the ribeye.

The camera housing design has other alignment features that facilitatethe user's ability to repetitively capture high quality (highdefinition, clarity, sharpness) images. For example, the camera housingis flat on the side of the opening. This flat underside or bottom 107 ofthe camera housing allows the user to place the camera housing flush andflat against the cutting surface and particularly against the surface ofthe ribeye cross section so that the appropriate viewing angle of thecamera is achieved when the image is captured. Another example of analignment feature for the camera housing is the first and second studguide extensions 108, 104 (104 not shown in this view, see FIG. 2) oneither side of the opening or viewing window of the camera housing andthe studs extend below the exterior surface of the bottom for side toside positioning. These stud guides facilitate a consistent alignment ofthe camera by preventing side-to-side motion of the camera.

The camera housing also has a backstop guide extension or an alignmentplate 112 which should consistently control the depth of insertion ofthe camera into the incision of the ribbed carcass for capturing animage of the ribeye. This guide provides for front to back alignment andas shown one embodiment of the guide extends below the bottom surface.The camera housing can be inserted into the incision until the backstopguide abuts the edge of the incision. The camera assembly 100 also has acommunication line 114 capable to carry digitized images that have beencaptured. The camera opening or viewing window can be rectangular inshape and large enough to encompass the entire ribeye cross section. Therectangular opening or viewing window also defines a field of viewobtainable by the camera. The front nose portion of the housing can befurther designed to have an upper hood portion, which is removablyattached to the base portion. If a transparent material is utilized forthe viewing window or if there is simply an opening, the removable upperhood portion facilitates cleaning.

Referring to FIG. 2, a side cross sectional view of the image capturingcamera assembly 100 is shown. The cross sectional view reveals theangular positioning of the camera 202 for optimal viewing through theopening 204 or viewing window of the housing. The positioning of thecamera to view the ribeye cross section is driven by the wedge-shapedhousing design and the position of the viewing window 204. The angle ofthe camera also minimizes back reflections into the lens of the camera.The downward canted angle of the camera is such that field of view 206of the camera is canted downward and the viewing angle 208 creates anoblique angle of incidence 210 at the viewing window such that almostall reflections from the attached camera flash will travel away from thelens and be absorbed by the substantially non-reflective interior of thecamera housing. This is particularly important if a transparentmaterial, such as glass, covers the opening, however, the viewing windowcan simply be an opening. If the viewing window is simply an opening, atransparent material such as glass can be installed over the opening ofthe rear portion 110 vertically along seam 216. This material willisolate the camera and electronics from contaminants. Also, if atransparent material is installed along seam 216. The camera 202 can bemoved closer to the transparent material to avoid reflection back intothe lens. This configuration has advantages in that the transparentmaterial does not make contact with the object for which an image inbeing captured. The viewing angle and field of view are angled such thatthe field of view of said camera at least subtends the entire view ofthe viewing window 204 such that an image of the cutting surface seenthrough the viewing window is fully captured.

The camera can be a digital camera. The digital camera utilized can beany type of color digital camera providing adequate resolution. A coloranalog camera can also be utilized but the analog image must bedigitized by a frame grabber function which requires additional cameracircuitry. Optionally, the frame grabber circuitry can be part of animage analysis computing system in lieu of being part of the cameracircuitry. The camera can also be designed with a camera image outputoperable to output an image captured by the camera for input to an imageanalysis computing system.

Referring to FIG. 3, a front cross sectional view of the image capturingcamera assembly is shown. One embodiment of the invention is shown witha camera 202 having a circular camera flash 304 that extends aroundsurrounding the lens 306 of the camera. The circular flash designprovides for uniform lighting when the image is being captured. Toobtain uniform lighting, the camera flash need not be circular. Thecamera flash can optionally extend substantially around the lens of thecamera. For example, the flash could have multiple flash elementsegments which substantially surround the lens in a substantiallysymmetrical pattern.

For prevention of glare due to the flash, the opening to the housing canoptionally be covered with a glare resistant window made of glass orsome other transparent material. The window prevents undesired materialgetting inside the camera housing through the opening. The window isremovably mounted over the opening such that it can be removed forcleaning. Also, as discussed above, the housing is preferably atwo-piece housing comprising a rear portion and a front nose portion,where both the front nose portion and rear portion can each optionallyhave an upper hood portion and base portion, where the upper hoodportion of the housing is removably mounted to the lower base portion ofthe housing. The ability to remove the upper hood portion of the housingallows for the upper hood portions to be removed such that the assemblycan be readily cleaned. The special housing design of the camerashelters the camera from the surrounding ambient light environment. Thehousing provides for a self-contained environment for capturing an imageof the ribeye. This self-contained environment, along with the cameraflash, provides adequate uniform lighting for the camera when capturingthe image. The housing also limits the field of view of the camera.

Referring to FIG. 4, a functional diagram of the overall image analysissystem is shown. The system comprises the image capturing cameraassembly 100 as described in FIGS. 1-3 for capturing an image of theribeye cross section. The camera contained therein could be an analogcamera or a digital camera. However, if an analog camera is utilized,additional circuitry is required to digitize the image prior to, orsubsequent to transmitting the image to the image analysis computingstation 402. The image capturing camera has a camera image outputintegral with communication line 114 for transmitting the image out toan image analysis, computing system. The image analysis computingstation performs the image analysis function by executing an imageanalysis algorithm. The execution of the image analysis algorithmanalyzes the image and identifies various parameters that are utilizedfor grading the carcass. The algorithm then grades the carcass based onthe parameters identified. A monitor 404 can also be communicably linkedto the image analysis computing station by way of a CPU 406 fordisplaying the image captured. The algorithm can be further operable todisplay the image on a monitor in a color coded format to identify thevarious lean portions and fat portions of the image. The system can alsopresent a real time image on the monitor as seen by the camera when theuser is positioning the camera over the ribeye, which may facilitatepositioning the camera to assure the entire ribeye is in the image. Studguide extensions 108 and backstop guide 112 are also used for alignment.The stud guide extension can be positioned on either side of the cuttingsurface for side-to-side alignment. The front end nose portion of thecamera housing assembly can be inserted into the incision until thebackstop guide 112 abuts the edge 408 of the incision. The stud guidesand backstop guide can be positioned such that when the camera assemblyis inserted in the ribbed incision, the viewing window is positionedrelative to the ventral side of the ribeye and the same features of thecross section are consistently captured. For example, the viewing windowcan be positioned in a medial lateral direction. The image and therelated data can also be stored on the image analysis computing stationfor future reference. The image analysis computing station can be acustomized computing station or any personal computer with adequateprocessing and memory to perform the image analysis function.

Referring to FIG. 5, a flow diagram 500 of the image analysis algorithmis shown. The image analysis algorithm performs a method for grading abeef carcass. The method as shown in FIG. 5 accommodates the cameradesign by correcting geometric distortions, shading and intensity. Oneembodiment of the camera design creates a geometric distortion becausethe image is captured at an oblique angle. Intensity and shadinganomalies also result from the angle of camera and the housing design.Based on the design of the camera, the image has distortion in the x andy directions. The reason for the angle is the acute wedge shape of thehousing and the position of the viewing window. Due to the housing, thecamera is angled downward such that its field of view can subtend theviewing window. The substantial wedge shape of the housing is idealbecause it provides a very small nozzle like end of the unit which canbe inserted in the incision and placed on the ribeye even if the ribbingincision is improper. The shading anomaly occurs because a camera flashlight is used to provide good contrast between the ribeye and thebackground image. However, due to the angle between the light and theribeye surface light shading in the image results. The level ofintensity in certain areas of the image may have anomalies for the samereasons. Therefore, both the distortion and the shading have to becorrected.

The image input functional block 501 is operable to input the image fromthe image capturing system or camera.

The geometrical correction functional block 502 is representative of thefunctional step for correcting the image due to angular distortioncaused by the viewing angle of the camera. A mathematical correction ofthe image based on the known angle of the camera transforms the image tocorrect the x and y directional distortion. The parameters for thistransformation can be used for every image taken by the camera. Methodsfor correcting x and y directional distortions are well known in theart. For example, an image can be captured of grid lines contrastedagainst a white background with the camera assembly. The grid lines areparallel in both the x and y directions and spaced an equal distanceapart. When the image is captured, the grid lines are distorted in boththe x and y directions. A mathematical algorithm can be developed tocorrect the grid lines in the image. This algorithm can be utilized tocorrect other images.

The shading correction functional block 504 is representative of thestep of correction for shading anomalies. A mathematical correction ofthe image transforms the shading image into an approximately equallyintense image over the complete image area. Methods for correcting forshading anomalies are well known in the art. For example, an image canbe captured of a white uniform background with the camera assembly. Whenthe image is captured, shading anomalies will likely result. Amathematical algorithm can be developed to correct the shading returningthe image to a uniform white. This algorithm can be utilized to correctother images. The parameters are predetermined based on the angle of thecamera and flash and the shape of the housing for the shading correctionand these parameters can be used for every image taken by the camera.

The flip image if right carcass side (compliment side) functional block506 is representative of the step that flips the image if a complimentside carcass is being examined. For one embodiment of the invention thealgorithm can be designed to work with ribeyes of a left carcass side.If there is a right carcass side the image can be flipped and theanalysis works as it would for a left carcass side. Methods are wellknown in the art for distinguishing an image from its compliment or inthis case distinguishing an image of the left carcass side from an imageof the compliment right carcass side. For example, an algorithm can bedeveloped to distinguish between the direction of a given taper of aportion of an object and its compliment. See U.S. Pat. No. 5,944,598.issued Aug. 31, 1999 to Tong et al.

The scale correction to pre defined intensity level functional block 507is representative of the function to correct overall intensity andcontrast. The image is scaled to a pre defined intensity whilemaintaining or improving the relative contrast. The area is analysed forthe pixels with the highest intensity. If the intensity of these pixelsare lower than a predefined level where said predefined level isoptimized for a given camera's flash, resolution and contrast ratio,then the whole image is transformed in a way that the highest intensitypixel has the pre defined intensity level and all other pixels withlower intensities are linearly transformed to their corrected relativeintensity. This step improves images with low light by increasing thecontrast and brightness.

The first adaptive colour classification functional block 508 performsthe first color segmentation step for the image. The aim of the colourclassification function is to separate and categorize the pixels of theimage into a component of Background (almost black), Fat (almost white)or Lean (almost red) in a three dimensional colour space R,G,B (red,green, blue). To establish the three start points in the RGB color spacefor the respective colour classifications, the brightest and darkestareas in the image will be analyzed and the lightest area will beanalyzed to establish the start point for fat and the darkest area willbe analyzed to establish a start point for the Background. Analyzing thedarkest and lightest areas to establish the respective start points canbe as simple as determining the darkest or lightest pixel or pixelswithin the respective areas and using as a start point or determiningthe center of gravity of each of the respective areas and using as astart point. Also, please note that the lightest and/or the darkestareas can be as small as a single pixel if the algorithm is so designed.The start point for the lean will be estimated in this first adaptivecolour classification step to be between the two start points of fat andBackground (for example, 0.5 of the vector distance between the twopoints). Once the three start points are established, the nearestneighbour method is utilized to decide for each point or pixel of theimage if it is a point of the class Background, Fat or Lean. If a pixelhas nearly the same distance between two of the start points forinstance between fat and lean then that pixel is classified as unknown.Classifying the pixels having nearly the same distance as unknown isnecessary because for some meat cuts the overall color range of fat mayoverlap with the color range of lean, thus, the difference between thedistances to the start points may be too close to classify. For example,a criterion could be if the shorter distance is not less than 80% of thelonger distance, then the distances are considered nearly the same andthe pixel is classified as unknown. After the first color classificationstep is performed all pixels are sorted (or classified) in the fourclasses background, lean, fat or unknown.

The preliminary outside contour functional block 510 performs the stepof determining a first preliminary outside contour. The result of thefirst color classification step is utilized to analyze the outsidecontour of the cutting surface. This function is performed by examiningeach pixel coming inward from the image border and determining if thereis a gradient between a pixel of the class Background with a neighborpixel which is not background (lean, fat or unknown). Each gradientpoint establishes an outside contour point. A successful completion ofthis step establishes a starting point for the contour analysis. Eachpixel coming inward from the image border is examined pixel by pixel forthe same gradient once around the complete object such that the resultgives the outside contour.

The first erode and dilate functional block 512 represents the erosionand dilation steps to further define the contour. Once the firstpreliminary outside contour has been established an erosion anddilatation of this preliminary outside contour is performed to eliminatelittle attachments on the outside contour like fat, bone or lean parts.This step is performed by iteratively eroding the contour by iterativelyshrinking the outside contour a pre determined number of times to acontour inside the last contour (erode) and after that by enlarging withsame number of iterations a contour outside the last contour. One methodof eroding the outside contour is to iteratively erode the exterior mostpixels that form the last outside contour pixel-by-pixel andlayer-by-layer a predetermined number of times. The number of times isdetermined and optimized based on the resolution of the camera, thetypical overall area of the meat cut being examined, the typical area ofsurrounding fat and surrounding lean, and the typical number and sizeand contours of lean. For example, a camera having a moderate resolutionof 768×572 pixels can require 10 times erosion when analysing a typicalribeye. Dilation is then performed the same number of times by dilatingpixels immediately adjacent the last contour. After the dilation step,little attached parts are excluded from the preliminary outside contourof the cut surface to establish a new outside contour. Variouserosion/dilation techniques that are well known in the art can beutilized.

The centre of gravity of the new outside contour functional block 514 isrepresentative of the step to determine the center of gravity of the newoutside contour. The center is located nearly always in the ribeye.

The measurement of actual lean color functional block 516 isrepresentative of the step to determine the true adaptive start pointfor lean color in the ribeye, which is the second adaptive colorclassification. Around the center of gravity a rectangular subarea canbe measured with a predetermined size. Defining this predetermined sizesubarea to have a rectangular geometry can be done for simplicity,however, a subarea having any geometry can be used. The size of therectangle (or subarea having any other geometry) is determined andoptimized based on the resolution of the camera, the size of the objector meat being examined and what is reasonably large enough to obtain agood sampling for color determination yet staying within the area of theobject or meat of interest. For example, for a camera having aresolution of 768×572 pixels capturing a ribeye image, a rectangle sizedwhich will encompass 50×50 pixels can be sufficient. The adaptive startpoint for the color of the lean is then determined by only measuring thecolor of pixels in that rectangle, which have a color classificationclass “Lean”. In other words, all pixels with the class Fat or Unknownwithin that rectangular are not used to calculate the average leancolor. This is very important in cases where within the rectangle thereis a lot of marbling or the rectangle is somewhat located in a fat area(can happen on very fat animals). With this method it doesn't matterbecause only lean pixels are considered.

The second adaptive color classification output functional block 518 isrepresentative of taking the adaptive start points and calculatingcertain parameters because now an adaptive start point for the lean isestablished rather than the previous estimate in the first adaptivecolor classification. The first color classification only providedadaptive start points for fat and Background. The classification itselfis the same method as previously performed but with full adaptive startpoints. This adaptive classification gives us the final segmentation ofthe cutting surface into background, lean, fat and unknown.

The following parameters can now be calculated by a classification areafunction in this step:

total area of cut surface

total lean area

total fat area

total unknown area

The determination of a first ribeye adaptive contour functional block520 starts from the center of gravity examining the pixels looking for agradient between lean and fat/unknown/background using the adaptivecolor classification now established. The gradient searched for isbetween lean to something else (non-lean). Once a start point isestablished the method goes around the object to analyze the contourthereby defining the first ribeye contour. If the resulting contour istoo small to be a ribeye we look further until we find a contour withreasonable size. The limits (min and max) are predetermined adaptivelybased on the size of the preliminary outside contour. Deciding whether acontour is too small can be determined by comparing the size of thepreliminary outside contour to what the typical ribeye size is for a cutsurface having a given preliminary outside contour. This step is neededto be assured that it is the ribeye contour and not the contour of anadjacent muscle.

The ellipse into the ribeye functional block 522 is representative ofthe step to calculate a new center of gravity from the first ribeyecontour. From the previously established center of gravity the methodextends outward in four directions (north, south, east and west) untilthe ribeye contour (see FIG. 5A, Item 540) is hit as represented in FIG.5A by lines 542, 544, 548, and 546 respectively. This provides ahorizontal and vertical size of the inside of the first ribeye contour.By using a predetermined factor (for example, 0.5) to these dimensionsas identified by 550, 552, 554, and 556 of FIG. 5A, we put an ellipse558 around the center of gravity. This ellipse is created using the 0.5factor in order to never hide the ribeye contour. Other factors could beutilized when appropriate, particularly for other meat cuts. Inside theellipse all fat classed pixels are changed to be classed Lean. Thishelps to clear at this step a lot of marbling for a better ribeyecontour search in the next steps. (Later for marbling determination thecleared fat areas are used again so there is no missing marbling.) Anellipse is utilized in this functional step because an ellipse closelyapproximates the shape of a ribeye, however, other closed curvegeometries can be utilized.

The determination of the second ribeye contour functional block 524performs a similar operation as functional block 520 determining asecond adaptive gradient, but with the ellipse around the center onlyhas lean classified pixels inside when determining this second ribeyecontour.

The second erode and dilate functional block 526 performs the same typeof erosion and dilation as performed by functional block 512, but forthe second adaptive ribeye contour instead of the preliminary outsidecontour. With this method we cut off attached muscles. However, thisdilatation differs from block 512 in that this dilation will go with ahigher number of steps than the erosion to lay a band around the ribeyefor the third ribeye contour search. This may be necessary due to theloss of accuracy of the contour due to erosion.

The determination of the third adaptive ribeye contour functional block528 performs the same function as functional block 520 determining athird adaptive gradient. However, the ellipse around the center has onlylean classified pixels inside the ellipse and the attached muscles arecut off.

The search for corners/edges functional block 530 cleans up anyundesired attached adjacent muscle that remains after functional blocks524 to 528 have been performed. The method examines the third adaptiveribeye contour looking for corners (see FIG. 5B, 560) that may indicatean undesired attached muscle in the following way. An actual location onthe ribeye contour where there is an outward protruding contour isidentified and on either side of the contour first and second straightlines (see FIG. 5B, 562 and 564) are utilized to linearly approximatethe curve of the contour and the lines have a predetermined length andthe lines are positioned on the ribeye contour in a frontward andbackward manner such that they intersect forming an angle 566. Thepredetermined length must be long enough to adequately approximate thetypical contour. For example, when utilizing a camera having a 768×572pixel resolution for capturing a ribeye, first and second approximationlines 20 pixels long should be long enough to approximate and intersect.For example, the angle between the lines should be approximately 180° ora substantially flat contour. If the angle between the lines is smallerthan a predetermined level (90°) then the method assumes an undesiredcorner where there could still be an undesired attached muscles. Thepredetermined 90° angle could vary depending on the meat cut. Along apredetermined angle from the corner point we search now for an oppositecontour point 568 that would cut off the attached muscle. The cornerpoint is determined from the intersection of the two lines. However,before the method cuts off the corner/edge the method can preferablycheck different plausibility factors that should indicate if the corneris an undesired attached muscle or not. If the plausibility factorsindicate undesired muscle, the method cuts off the undesired muscleusing a circular pattern to cut off the corner/edge leaving a circularcontour or a curved cut line. One plausibility factor could be examiningthe ratio between the square of the lengths of the curved cut line overthe area cut off. If the ratio is small, then the area being cut can belarge relative to the ribeye area which can verify that it is anadjacent muscle. If the ratio is large, then the area being cut can besmall relative to the ribeye area which can indicate it is not anadjacent muscle. A second plausibility factor could be the length of thecurved cutting line relative to the height of the ribeye. For example,if the cutting line is longer than the typical quarter of the height ofa ribeye, then it is likely an adjacent muscle. A third plausibilityfactor could be the number of lean pixels as compared to the fat pixelsin the cut off area. If a much larger percentage of fat pixels, thenthis may verify the likelihood of cut off area being adjacent muscle.Once the corners/edges function is complete, the final ribeye contour isdefined.

The counting lean and fat pixels in ribeye functional block 532calculates the following parameters:

ribeye area

lean area in ribeye

fat area in ribeye

unknown area in ribeye

number of fat objects in ribeye

average size of fat objects

number of gradients between lean and fat horizontal and vertical in theribeye

correction of number of fat areas (big fat pieces are not counted)

color measurement of all lean pixels for lean color

The fat strip functional block 534 determines a subcutaneous fat areapositioned between ⅝ and ⅞ along the axis of the ribeye and orthogonalto the ribeye contour and the following parameters are calculated:

area of fat

average fat thickness

once the above parameters have been calculated, the algorithm can insertthe parameters into regression formula for calculating meat quality andyield grade

Referring to FIG. 6, a flow diagram of the color segmentation portion ofthe algorithm is shown. This flow diagram outlines the adaptive methodfor color classification of pixels within the image. This adaptivemethod is important because the color of lean and fat can vary fromcarcass to carcass. For example, some carcasses may have a ribeye crosssection where the lean portion is a darker red than other carcasses.Another example is that the fat surrounding the ribeye cross section ofa beef carcass can sometimes have a reddish hue as opposed to othercarcasses where the fat is closer to a true white. The variation in leanand fat color from carcass to carcass make it difficult to predefine acolor range for fat or lean. Therefore, this adaptive method wasdeveloped to allow color classification to adapt to the lean color andfat color of a given carcass. The functional flow diagram in FIG. 6outlines the steps in the algorithm for this adaptive colorclassification method. Functional blocks 602 and 604 search the image tolocate the brightest and darkest areas of the image. The color of thebrightest area is utilized to define the start point or center point inthe RGB color space for pixels to be classified as fat pixels. The colorof the darkest area of the image is utilized to define the start pointor center point in the RGB color space for pixels to be classified asbackground pixels. The color start point in the RGB color space for leanwill be estimated to be between the two start points for fat andbackground. The functional steps for establishing the start points inthe RGB color space is defined by functional blocks 606 and 608.Functional block 610 represents the nearest neighbor functional stepwhich classifies each pixel as lean, fat, background or unknown. Thepixels are classified based on the closest start point in the RGB colorspace. However, if a given pixel is nearly the same distance to at leasttwo of the start points, then the pixel will be classified as unknown asoutlined above. Once the color classification is completed, the outsidecontour of a cutting surface is determined as represented by functionalblock 612 and further, functional block 612 determines the center ofgravity based on the outside contour determined in this step. Functionalblock 614 defines a rectangular subarea about the center of gravitydetermined by functional block 612 and determines the average lean colorwithin the rectangle, thereby redefining the lean color start pointwithin the RGB color space. As noted above, a subarea having anygeometry can be utilized. Functional block 616 represents the adaptivereclassification of the start points for lean, fat and background in theRGB color space. This method provides a more accurate colorclassification than other methods currently utilized. An accurate colorclassification is critical for the steps of defining the contour usingthe method of detecting a gradient from one classification to another.

Referring to FIG. 7, a detailed flow diagram of the contourdetermination portion of the algorithm is shown. Functional block 702represents the functional step of determining the preliminary outsidecontour by starting from the border of the image working inward anddetecting gradients between background and non-background pixels. Oncethe preliminary outside contour has been defined utilizing the gradientmethod of functional block 702, erosion and dilation of the image isperformed by functional block 704. Once the first erosion and firstdilation 704 occurs, a new outside contour is defined and further,functional block 706 defines the center of gravity based on that newoutside contour. Functional block 708 is representative of determiningthe first ribeye contour by starting from the center of gravity andworking outward looking for gradient between lean and non-lean therebydefining the first ribeye contour. A new center of gravity is determinedbased on the first ribeye contour and this functional step isrepresented by functional block 712. Functional block 718 defines anellipse about the new center of gravity and within the ellipse definesall pixels as lean. This facilitates determining the contour of the leanutilizing gradients. This is performed by starting from the center ofgravity and working outward to determine gradients between the all leanpixel within ellipse and non-lean pixels. This gradient method isdefined by functional block 720 which determines and defines a newsecond ribeye contour. Functional block 722 performs similar erosion anddilation as step 704 except dilation will be with a higher number ofsteps than the erosion. A third ribeye contour is then determined byfunctional block 726 by performing a similar method as functional block720. Functional blocks 728 and 730 search for contours that are not partof the ribeye and defines a curved cutting line to cut them off.Plausibility checks as outlined herein can be performed as representedby functional block 732. If Plausibility checks confirm that a contouris not part of ribeye, then a cut is performed as represented byfunctional block 734.

The various image analysis grading system examples shown aboveillustrate a novel image analysis grading apparatus and method. A userof the present invention may choose any of the above image analysisgrading apparatus or method embodiments, or an equivalent thereof,depending upon the desired application. In this regard, it is recognizedthat various forms of the subject image analysis grading invention couldbe utilized without departing from the spirit and scope of the presentinvention.

As is evident from the foregoing description, certain aspects of thepresent invention are not limited by the particular details of theexamples illustrated herein, and it is therefore contemplated that othermodifications and applications, or equivalents thereof, will occur tothose skilled in the art. It is accordingly intended that the claimsshall cover all such modifications and applications that do not departfrom the spirit and scope of the present invention.

Other aspects, objects and advantages of the present invention can beobtained from the study of the drawings, the disclosure and the appendedclaims.

INDUSTRIAL APPLICABILITY

The present invention has significant industrial applicability. Asdescribed herein, many meat processing facilities still utilize humangraders to grade the quality of meat from a beef carcass or to predictlean meat yield from a carcass. However, the methods utilized by humangraders are very subjective. This subjectivity can have an adversefinancial effect on the meat processing facility as outlined herein. Dueto the subjective nature of grading by human graders, image analysissystems have been developed to automatically grade the beef carcass.However, image analysis systems prior to this invention have hadproblems reliably grading a beef carcass.

One aspect of the present invention is its ability to consistentlycapture a good image of the ribeye cross section. This is made possibleby the substantially wedge-shaped camera design that allows the user toreadily insert the camera into the incision of the ribbed carcass. Also,the camera design includes various alignment means to facilitateaccurate and consistent alignment of the camera prior to capturing theimage. The wedge-shaped camera design and the alignment means allow theuser to consistently capture a good image, even when the incision of theribbed carcass is shorter than the norm, making it difficult even forhuman graders to examiner the ribeye cross section. The wedge-shapedcamera with alignment means makes it easy for the user to insert thecamera into the incision consistently capturing good images.

The present invention also addresses the issue of inconsistent orinadequate lighting in a beef processing facility. The hood-shapedcamera design creates an isolated image capturing environment such thata camera flash can control the lighting for the image. Further, theimage analysis computing system can accommodate various carcasses havinginconsistent lean and fat color from carcass to carcass. The adaptivecolor segmentation method of the present invention allows the presentinvention to adapt to each unique carcass.

The camera housing can be manufactured in stainless steel making foreasy cleanup. Also, the camera housing can be a two-piece design suchthat the top portion of the housing is removably attached to the bottombase portion such that cleaning can be facilitated. Also, the handledesign is ergonomically placed and shaped for easy handling andpositioning of the camera. The handle can be designed with an integraltrigger that allows the user to trigger the shutter of the camera andthe camera flash. The ergonomic design of the handle allows the user tomanipulate and position the camera with one hand while triggering thecapturing of the image with the same hand.

The camera can be communicably linked to a mobile work station thatcomprises the image analysis computing means, as well as a monitor forviewing the image. The work station, as well as the image analysiscomputing system and monitor, can be organized appropriately for themeat processing work environment. The image analysis computing systemcould be a standard personal computer based system having theappropriate software installed. The camera and work station designallows the user to operate in a production meat processing environmentwhile rapidly grading each carcass and storing the data to the imageanalysis computing system for later review and analysis. The presentinvention provides for an objective grading system that is designed tooperate in a production meat processing facility and further designed toprovide a consistent and reliable grading means.

What is claimed is:
 1. An animal carcass grading system for predictingquality and meat yield comprising: an image capturing camera assemblyfurther comprising, a substantially wedged-shaped housing having a flatbottom side, said bottom having a viewing window; a camera contained insaid housing where the field of view of said camera is canted downwardto at least subtend the viewing window, said camera having a cameraimage output and a camera flash; a trigger communicably linked to thecamera flash and camera and said trigger operable to trigger the camerato capture an image and further operable to trigger the camera flash;and where said camera image output is operable to output the imagecaptured for input to an image analysis computing system.
 2. An animalcarcass grading system as recited in claim 1 where the flat bottom ofsaid housing further comprises first and second guide extensionsattached thereto and extending below the exterior surface of the flatbottom and disposed on opposing sides of the viewing window for aligningthe viewing window side-to-side.
 3. An animal carcass grading system asrecited in claim 2 where the flat bottom of said housing furthercomprises a back stop guide extension attached thereto and extendingbelow the exterior surface of the flat bottom and disposed to one sideof the viewing window for positioning to the viewing window front toback.
 4. An animal carcass grading system as recited in claim 3 wherethe wedge-shaped housing has a handle extending from the bottom andwhere said trigger is integral with said handle.
 5. An animal carcassgrading system as recited in claim 1 where said camera is an analogcamera further comprising frame grabber circuitry operable to digitizethe analog image captured.
 6. An animal carcass grading system asrecited in claim 1 where said camera is a digital camera.
 7. An animalcarcass grading system as recited in claim 1 where said camera flashextends substantially around the lens of the camera.
 8. An animalcarcass grading method for predicting quality and yield comprising thesteps of: providing an image capturing camera assembly furthercomprising the steps of, enclosing a camera in a substantiallywedged-shaped housing where said housing has a flat bottom, where saidbottom has a viewing window and where the field of view of said camerais canted downward to at least subtend the viewing window; placing theviewing window over an object to be captured; flashing with a cameraflash and capturing an image of the object with the camera; andoutputting the image through a camera image output operable to output animage to an image analysis computing system operable to grade the image.9. The animal carcass grading method for predicting as recited in claim8 where placing the viewing window is placing the viewing window usingfirst and second guide extensions attached to said housing and extendingbelow the exterior surface of the flat bottom and disposed on opposingsides of the viewing window operable for aligning side-to-sideplacement.
 10. An animal carcass grading method for predicting qualityand yield as recited in claim 9 where placing the viewing window isplacing the viewing window using a back stop guide extension attached tosaid housing operable for aligning front to back placement.
 11. Ananimal carcass grading method for predicting quality and yield asrecited in claim 8 where capturing an image is capturing an analog imageand said grading method further comprising the step of grabbing a framewith a frame grabber circuit operable to digitize the analog imagecaptured.
 12. An animal carcass grading method for predicting as recitedin claim 8 where capturing an image is capturing a digital image.
 13. Ananimal carcass grading method for predicting as recited in claim 8 whereflashing with a camera flash is flashing with a camera flash thatextends substantially around the lens of the camera.